package com.jt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin    //标识跨域
@RequestMapping("/web")
@PropertySource(value = "classpath:/hel.properties",encoding = "utf-8")
public class WebContoller {
    @Value("${hel}")
    private String hello;
    @GetMapping("/hello")
    public String hello(){

        return "Axios跨域请求,"+hello;
    }
}
